<template>
  <van-button @click="exit">退出登录</van-button>
</template>

<script>
export default {
    methods:{
        exit(){
            if (confirm('确定退出吗')){
                localStorage.clear()
                this.$router.push('/login')
            }
        }
    }
}
</script>

<style>

</style>